home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 4526 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: deepthought.de!holger
  2. From: holger@deep.hb.provi.de (Holger Bruns)
  3. Newsgroups: comp.sys.cbm,comp.os.misc,alt.comp.hardware.homebuilt,comp.sys.apple2,comp.sys.apple2.programmer,comp.sys.atari.8bit
  4. Subject: Re: 6502 Multitasking OS announce
  5. Date: Mon, 25 Mar 1996 07:02:41
  6. Organization: freelance writer
  7. Message-ID: <holger.979.00070BB3@deep.hb.provi.de>
  8. References: <4i94fs$stj@narses.hrz.tu-chemnitz.de> <holger.948.00030EE6@deep.hb.provi.de> <4ijtbe$7ca@no-names.nerdc.ufl.edu> <4ijuic$iiq@gatekeeper.liffe.com> <4innc7$hc4@no-names.nerdc.ufl.edu> <4itkri$qlc@seagoon.newcastle.edu.au>
  9. NNTP-Posting-Host: 193.101.45.22
  10. X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
  11.  
  12. In article <4j58eh$btc@saluki-news.wham.siu.edu> <agent@siu.edu> writes:
  13.  
  14. >How about this idea, to handle stacks?  I read a similar thing in an 
  15. >issue of Dr. Dobbs Journal, in an article about a small multitasker.
  16.  
  17. >Given that the stack is mostly going to be used for minor parameter 
  18. >passing and jsr's.  I think is a good assumption -- other data 
  19. >structures are better suited for larger jobs.
  20.  
  21. >Instead of copying the stack to and fro on every task switch, how about 
  22. >subdividing it?  Each task would be allocated a portion of the stack.  A 
  23. >task switch moves between the portions by adding or subtracting numbers 
  24. >from the stack register.
  25.  
  26. I guess, it will not work. The tasks cannot be executed independently. Only 
  27. the task on top of the stack will work without causing errors. Assume the 
  28. parameters of task 1 have been pushed to the top of the stack. The parameters 
  29. of task 2 are below of them. Now you try to execute task 2. Your stack 
  30. register will point to the bottom of the parameters of task 1. Pushing any 
  31. data to the stack will overwrite the parameters of task 1. Assume your 
  32. system decides to execute task 1 after executing task 2. Since the parameters 
  33. of task 1 are corrupted in this case, the system will crash.
  34.  
  35. Holger
  36.  
  37.